<template>
    <div style="height: 100%">
        <div id="app">
            <router-view />
        </div>
    </div>
</template>

<script>
/*引入monaco相关语言及提示*/
import jsonWorker from 'monaco-editor/esm/vs/language/json/json.worker?worker'
import cssWorker from 'monaco-editor/esm/vs/language/css/css.worker?worker'
import htmlWorker from 'monaco-editor/esm/vs/language/html/html.worker?worker'
import tsWorker from 'monaco-editor/esm/vs/language/typescript/ts.worker?worker'
import EditorWorker from 'monaco-editor/esm/vs/editor/editor.worker?worker';
window.monacoWorkConfig = {
    jsonWorker,
    cssWorker,
    htmlWorker,
    tsWorker,
    EditorWorker
}
export default {
	name: 'App',
  mounted(){
    this.initLinkLog();
  },
  methods:{
    getFilePath(fileId) {
      return "/api/api-system/system/core/sysFile/public/download/"+ fileId;
    },
    initLinkLog(){
      let fileId = localStorage.getItem("linkLogoUrl");
      if(fileId) {
        const oldLink = document.head.querySelector("[rel='icon']");
        if(oldLink){
          oldLink.href = this.getFilePath(fileId);
        }else {
          const link = document.createElement('link');
          link.rel = 'icon';
          link.href = this.getFilePath(fileId);
          document.head.appendChild(link);
        }
      }
    }
  }
}
</script>

<style lang="less">
#app {
	height: 100%;
	width: 100%
}
.rightDesign{
    height: 100%;
    .ant-tabs-nav{
        margin: 0px!important;
    }
    .ant-tabs-content-holder{
        flex: 1;
        overflow-y: auto;
        overflow-x: hidden;
    }
    .ant-collapse-header{
        padding: 10px 0px!important;
    }
    .ant-collapse-content-box{
        padding: 0px!important;
    }
    .ant-form-item{
        margin-bottom: 10px!important;
    }
    .ant-tabs-content{
        height: 100%;
    }
}
.ant-collapse-item{
    border-bottom: none!important;
}
</style>
